<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set value="${pageContext.request.contextPath}" var = "ctx"/>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<nav class="navbar navbar-fixed-top navbar-leaf">
    <div class="container">
        <div class="navbar-header">
            <a class="navbar-brand" href="javascript:void(0)">MMLOO</a>
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
                    data-target="#navbarForTeacher">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
        </div>
        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="navbarForTeacher">
            <ul class="nav navbar-nav">
                <li><a href="#"><span class="glyphicon glyphicon-home"></span> 首页</a></li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <span class="glyphicon glyphicon-tasks"></span>
                        商品管理
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="${ctx}/manage/goods/add">添加商品</a></li>
                        <li><a href="${ctx}/manage/goods/list">商品列表</a></li>
                    </ul>
                </li>
                <li class="dropdown">
                    <a href="#" class="dropdown-toggle" data-toggle="dropdown">
                        <span class="glyphicon glyphicon-tasks"></span>
                        商品促销管理
                        <span class="caret"></span>
                    </a>
                    <ul class="dropdown-menu" role="menu">
                        <li><a href="${ctx}/manage/goods/promotion/groupBuy/list">团购管理</a></li>
                        <li><a href="${ctx}/manage/goods/promotion/fastBuy/list">抢购管理</a></li>
                        <li class="divider"></li>
                        <li><a href="${ctx}/manage/goods/promotion/combinationBuy/list">组合套餐管理</a></li>
                        <li class="divider"></li>
                        <li><a href="${ctx}/manage/goods/promotion/givingBuy/list">满几赠几管理</a></li>
                        <li><a href="${ctx}/manage/goods/promotion/returnBuy/list">购物返还管理</a></li>
                    </ul>
                </li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
                <li><a class="cursor-default" href="javascript:void(0)">${loginUser.username}</a></li>
                <li>
                    <a class=" navbar-link" href="${ctx}/manage/logout">
                        <span class="glyphicon glyphicon-log-out"></span> 注销
                    </a>
                </li>
            </ul>
        </div>
        <!-- .navbar-collapse -->
    </div>
    <!-- .container -->
</nav>
<c:if test="${message.success}">
    <div class="alert alert-success alert-dismissible feedback-float fade in text-center">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <span class="glyphicon glyphicon-ok"></span>
        <span>${message.msg}</span>
    </div>
</c:if>
<c:if test="${!message.success}">
    <div class="alert alert-danger alert-dismissible feedback-float fade in text-center">
        <button type="button" class="close" data-dismiss="alert">&times;</button>
        <span class="glyphicon glyphicon-warning-sign"></span>
        <span>${message.msg}</span>
    </div>
</c:if>